package com.founder.chd_daily_query.entity.alarm;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.sql.Time;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "PUR_SET_UNITPRICE_MODEL", schema = "RBD_ALARM", catalog = "")
public class PurSetUnitpriceModelEntity {
    private String balanceId;
    private String contractId;
    private String contractCode;
    private String balanceCode;
    private String transportType;
    private String vendorId;
    private String receiveOrgId;
    private String fuelSort;
    private Long contractQnet;
    private Long contractPrice;
    private Long moneyAll;
    private Long coalUnitpricePur;
    private Long coalUnitpriceSet;
    private String status;
    private Long difference;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private Date lastUpdateDate;
    private String planAttribute;
    private String contractName;

    @Id
    @Column(name = "BALANCE_ID")
    public String getBalanceId() {
        return balanceId;
    }

    public void setBalanceId(String balanceId) {
        this.balanceId = balanceId;
    }

    @Basic
    @Column(name = "CONTRACT_ID")
    public String getContractId() {
        return contractId;
    }

    public void setContractId(String contractId) {
        this.contractId = contractId;
    }

    @Basic
    @Column(name = "CONTRACT_CODE")
    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }

    @Basic
    @Column(name = "BALANCE_CODE")
    public String getBalanceCode() {
        return balanceCode;
    }

    public void setBalanceCode(String balanceCode) {
        this.balanceCode = balanceCode;
    }

    @Basic
    @Column(name = "TRANSPORT_TYPE")
    public String getTransportType() {
        return transportType;
    }

    public void setTransportType(String transportType) {
        this.transportType = transportType;
    }

    @Basic
    @Column(name = "VENDOR_ID")
    public String getVendorId() {
        return vendorId;
    }

    public void setVendorId(String vendorId) {
        this.vendorId = vendorId;
    }

    @Basic
    @Column(name = "RECEIVE_ORG_ID")
    public String getReceiveOrgId() {
        return receiveOrgId;
    }

    public void setReceiveOrgId(String receiveOrgId) {
        this.receiveOrgId = receiveOrgId;
    }

    @Basic
    @Column(name = "FUEL_SORT")
    public String getFuelSort() {
        return fuelSort;
    }

    public void setFuelSort(String fuelSort) {
        this.fuelSort = fuelSort;
    }

    @Basic
    @Column(name = "CONTRACT_QNET")
    public Long getContractQnet() {
        return contractQnet;
    }

    public void setContractQnet(Long contractQnet) {
        this.contractQnet = contractQnet;
    }

    @Basic
    @Column(name = "CONTRACT_PRICE")
    public Long getContractPrice() {
        return contractPrice;
    }

    public void setContractPrice(Long contractPrice) {
        this.contractPrice = contractPrice;
    }

    @Basic
    @Column(name = "MONEY_ALL")
    public Long getMoneyAll() {
        return moneyAll;
    }

    public void setMoneyAll(Long moneyAll) {
        this.moneyAll = moneyAll;
    }

    @Basic
    @Column(name = "COAL_UNITPRICE_PUR")
    public Long getCoalUnitpricePur() {
        return coalUnitpricePur;
    }

    public void setCoalUnitpricePur(Long coalUnitpricePur) {
        this.coalUnitpricePur = coalUnitpricePur;
    }

    @Basic
    @Column(name = "COAL_UNITPRICE_SET")
    public Long getCoalUnitpriceSet() {
        return coalUnitpriceSet;
    }

    public void setCoalUnitpriceSet(Long coalUnitpriceSet) {
        this.coalUnitpriceSet = coalUnitpriceSet;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "DIFFERENCE")
    public Long getDifference() {
        return difference;
    }

    public void setDifference(Long difference) {
        this.difference = difference;
    }

    @Basic
    @Column(name = "CREATE_DATE")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "LAST_UPDATE_DATE")
    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    @Basic
    @Column(name = "PLAN_ATTRIBUTE")
    public String getPlanAttribute() {
        return planAttribute;
    }

    public void setPlanAttribute(String planAttribute) {
        this.planAttribute = planAttribute;
    }

    @Column(name = "CONTRACT_NAME")
    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    @Override
    public String toString() {
        return "PurSetUnitpriceModelEntity{" +
                "balanceId='" + balanceId + '\'' +
                ", contractId='" + contractId + '\'' +
                ", contractCode='" + contractCode + '\'' +
                ", balanceCode='" + balanceCode + '\'' +
                ", transportType='" + transportType + '\'' +
                ", vendorId='" + vendorId + '\'' +
                ", receiveOrgId='" + receiveOrgId + '\'' +
                ", fuelSort='" + fuelSort + '\'' +
                ", contractQnet=" + contractQnet +
                ", contractPrice=" + contractPrice +
                ", moneyAll=" + moneyAll +
                ", coalUnitpricePur=" + coalUnitpricePur +
                ", coalUnitpriceSet=" + coalUnitpriceSet +
                ", status='" + status + '\'' +
                ", difference=" + difference +
                ", createDate=" + createDate +
                ", lastUpdateDate=" + lastUpdateDate +
                ", planAttribute='" + planAttribute + '\'' +
                ", contractName='" + contractName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PurSetUnitpriceModelEntity that = (PurSetUnitpriceModelEntity) o;
        return Objects.equals(balanceId, that.balanceId) &&
                Objects.equals(contractId, that.contractId) &&
                Objects.equals(contractCode, that.contractCode) &&
                Objects.equals(balanceCode, that.balanceCode) &&
                Objects.equals(transportType, that.transportType) &&
                Objects.equals(vendorId, that.vendorId) &&
                Objects.equals(receiveOrgId, that.receiveOrgId) &&
                Objects.equals(fuelSort, that.fuelSort) &&
                Objects.equals(contractQnet, that.contractQnet) &&
                Objects.equals(contractPrice, that.contractPrice) &&
                Objects.equals(moneyAll, that.moneyAll) &&
                Objects.equals(coalUnitpricePur, that.coalUnitpricePur) &&
                Objects.equals(coalUnitpriceSet, that.coalUnitpriceSet) &&
                Objects.equals(status, that.status) &&
                Objects.equals(difference, that.difference) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(lastUpdateDate, that.lastUpdateDate) &&
                Objects.equals(planAttribute, that.planAttribute) &&
                Objects.equals(contractName, that.contractName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(balanceId, contractId, contractCode, balanceCode, transportType, vendorId, receiveOrgId, fuelSort, contractQnet, contractPrice, moneyAll, coalUnitpricePur, coalUnitpriceSet, status, difference, createDate, lastUpdateDate, planAttribute, contractName);
    }
}
